<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <%
        String path = request.getContextPath();
        String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort();
    %>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>添加书籍信息</title>
    <%--<link rel="stylesheet" href="<%=basePath%>/css/bootstrap.min.css" />--%>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"
          integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">

    <link rel="stylesheet" href="<%=basePath%>/css/header.css"/>
</head>
<body>
<script type="text/javascript" src="js/jquery-2.0.3.min.js"></script>
<%--	<script type="text/javascript" src="js/bootstrap.min.js"></script>--%>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"
        integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd"
        crossorigin="anonymous"></script>

<div>
    <p style="font-size: 25px; margin-top: 20px; margin-left: 42px">添加书籍信息</p>
</div>
<hr
        style="height: 10px; border: none; border-top: 10px groove skyblue;"/>
<form style="margin-top: 30px; margin-left: 450px" action="<%=basePath%>/admin/ManagerServlet?op=addBook" method="post" enctype="multipart/form-data">
    <div class="form-group">
        <label>书籍名称：</label> <input type="text" class="form-control"
                                    id="BookName" name="bookName" placeholder="书籍名称"
                                    style="width: 700px">
    </div>
    <div class="form-group">
        <label>书籍作者：</label> <input type="text" class="form-control"
                                    id="BookAuthor" name="bookAuthor" placeholder="书籍作者"
                                    style="width: 700px">
    </div>
    <div class="form-group">
        <label>书籍出版社：</label> <input type="text" class="form-control"
                                     id="BookPress" name="bookPress" placeholder="书籍出版社"
                                     style="width: 700px">
    </div>
    <div class="form-group">
        <label>书籍分类：</label> <select class="form-control" name="categoryId"
                                     title="书籍分类" style="width: 700px">
        <option selected="selected">---所属分类---</option>
        <c:forEach items="${cs}" var="c">
            <option value="${c.categoryId}">${c.categoryName}</option>
        </c:forEach>
    </select>
    </div>
    <div class="form-group">
        <label for="file">图片上传：</label> <input type="file"
                                               id="file" name="file">
    </div>
    <div class="form-group">
        <label>书籍简介：</label>
        <textarea class="form-control" rows="3" id="BookDesc"
                  name="bookDesc" placeholder="书籍简介" style="width: 700px"></textarea>
    </div>
    <div class="form-group">
        <label>书籍单价：</label> <input type="text" class="form-control"
                                    id="BookPrice" name="bookPrice" placeholder="书籍单价/￥"
                                    style="width: 700px">
    </div>
    <div class="form-group">
        <label>书籍库存：</label> <input type="text" class="form-control"
                                    id="BookKunumber" name="bookKunumber" placeholder="书籍库存"
                                    style="width: 700px">
    </div>
    <br>
    <button type="submit" class="btn btn-default"
            onclick="window.location='manager/ManagerServlet?op=addBook'">提交
    </button>
    <button type="button" class="btn btn-default" data-dismiss="modal"
            style="margin-left: 100px"
            onclick="window.location='managerIndex.jsp'">关闭
    </button>
</form>
</body>
</html>